Redeem Points
Details
Used to redeem points from exisiting customer.
URL : <base_url>/rewards/redeem
Method : POST
Authentication required : YES
Request parameters
In the request URL, provide the following parameter in the URL
Parameter | Type | Example | Description |
---|---|---|---|
number | string | +18761234567 | required |
reference_number | string | 1235673737 | Optional parameter. |
reward_id | integer | 1 | required. |
cashier_pin | integer | 123456 | required. |
Success Response
Code : 200 OK
Content :
{
"success": true,
"has_reference_number": false,
"activity_id": 43
}
Error Responses
Condition : Invalid loyalty config.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Loyalty service not active for this account."
}
}
Condition : Invalid loyalty subscription.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Invalid loyalty subscription."
}
}
Condition : Invalid spend amount.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"spend": "Minimum spend is (1000)."
}
}
Condition : Cashier.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"cashier_pin": "Invalid cashier pin."
}
}
Condition : Reward.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"reward_id": "Invalid reward id."
}
}